<template>
	<view class="body">
		<view class="bg">
			<image class="bgImg" src="../../static/record/bg-1.png"></image>
			<view class="pr">
				<!-- 第一 -->
				<view class="record">
					共记录<text class="num">{{date_all}}</text>天,减轻<text class="num">{{weight}}</text>斤
				</view>
			</view>
			<view class="two">
				<!-- 第二 -->
				<view class="circle" @click="board" @tap="bottom()" data_text="weight" />
				<view class="pr-s" @click="board" @tap="bottom()" data_text="weight">
					<text class="weight_int">{{day_weight_int ? day_weight_int:0}}</text><!-- 整数-->
					<!-- {{day_weight}} -->
					<text class="decimal">.{{day_weight_float ? day_weight_float:0 }}</text>
					<text class="axe">斤</text>
				</view>
				<luPopupWrapper ref="luPopupWrapper" :type="type" :transition="transition" :backgroundColor="backgroundColor"
				 :active="active" :height="height" :width="width" :popupId="popupId" :maskShow="maskShow" :maskClick="maskClick"
				 :closeCallback="closeCallback">
					<view class="date_time">
						<!-- 时间选择器 -->
						<view v-if="pickershow">
							<picker :value="riqi_key" @change="bindDateChange" :range="riqi">
								<view class="uni-input">
									<image src="../../static/Triangle.png" class="date_lower"></image>{{tips=='' ? riqi[riqi_key] : tips}}
								</view>
							</picker>
						</view>
						<view class="uni-input" v-if="!pickershow">
								{{tips=='' ? riqi[riqi_key] : tips}}
						</view>
						<view class="cloce_father" @click="close"><image src="../../static/off.png" class="cloce"></image></view>
					</view>
					<view class="keyboard">
						<view class="show_date"><text class="date_num">{{date_num}}</text>
							<view style="position:absolute;right:100upx;font-size:36upx; font-family:PingFangSC-Regular;color: #999999;">斤</view>
						</view>
						<view class="key_details">
							<view data-text="1" class="key" @click="keyboard">1</view>
							<view data-text="2" class="key" @click="keyboard">2</view>
							<view data-text="3" class="key" @click="keyboard">3</view>
							<view data-text="4" class="key" @click="keyboard">4</view>
							<view data-text="5" class="key" @click="keyboard">5</view>
							<view data-text="6" class="key" @click="keyboard">6</view>
							<view data-text="7" class="key" @click="keyboard">7</view>
							<view data-text="8" class="key" @click="keyboard">8</view>
							<view data-text="9" class="key" @click="keyboard">9</view>
							<view data-text="." class="key" @click="keyboard">.</view>
							<view data-text="0" class="key" @click="keyboard">0</view>
							<view data-text="del" class="key" @click="keyboard">
								<image src="../../static/del.png" class="del"></image>
							</view>
						</view>
					</view>
					<view class="sure" @click="Preservation">
						保存
					</view>
				</luPopupWrapper>
				<view class="punch">{{punch}}</view>
				<button class="share" open-type="share">分享</button>
			</view>
		</view>
		<view class="three">
			<view class="flex-container">
				<view class="flex-item"><text class="num-2">{{last ? last : '--'}}</text>斤</view>
				<view class="flex-item" v-if="!no_target" @click="board" @tap="bottom('target_weight')" data_text="target_weight">
					<text class="num-2">{{target_weight}}</text>斤
				</view>
				<view class="flex-item" v-if="no_target" @click="board" @tap="bottom('target_weight')" data_text="target_weight">
					<image class="pen" :src="notarget" /><text class="pen_catty">斤</text></view>
				<view class="flex-item" v-if="!carryout"><text class="num-2">{{distance ? distance : '--' }}</text>斤</view>
				<view class="flex-item" v-if="carryout"><image class="out" :src="ok" /></view>
			</view>
			<view class="flex-container">
				<view class="flex-item-1">比昨天</view>
				<view class="flex-item-1" @click="board" @tap="bottom('target_weight')" data_text="target_weight">目标体重</view>
				<view class="flex-item-1" v-if="!carryout">距离目标</view>
				<view class="flex-item-1" v-if="carryout">目标完成</view>
			</view>
		</view>
		<!-- 修改2019-9-29 -->
		<view class="four_hedaer">
			<view class="four">
				<image class="left_btn" v-if="showleft" @click="leftbtn()" src="../../static/left_btn.png"></image>
				<view  class="make"><text class="makel">{{ononday}}</text></view>
				<image class="right_btn" v-if="showbtn"  @click="rightbtn()" src="../../static/right_btn.png"></image>
			</view>
			<view class="week">
				<view  v-for="oneweek in weeks">
					<text class="week_one">{{oneweek.name}}</text>
				</view>
			</view>
		</view>
		<!-- 修改2019-9-29 -->
		<view class="qiun-columns">
			<view class="charts" v-bind:style="{height:screenHeight/2-180+'px'}" @click="board" @tap="bottom('Supplementary_weight')" data_text="Supplementary_weight">
				<!-- 'Supplementary_weight' -->
				<!--#ifndef MP-ALIPAY -->
				<canvas canvas-id="canvasColumn" v-if="canvashide" id="canvasColumn" class="charts" v-bind:style="{height:screenHeight/2-140+'px'}"
				 disable-scroll=true @touchstart="touchColumn"></canvas>
				<!--#endif-->
			</view>
		</view>
		<!--记录第一次3s后弹出的模态框  -->
		<view class="modal_l" v-if="digit">
			<view class="prompt_l">
				<image class="prompt" src="../../static/prompt.png"></image>
				<view class="modify">点击柱状就可以补记和修改这天的体重啦<text class="close" v-on:click="closeC" v-if="closeModal">X</text></view>
			</view>
		</view>
		<!-- <view class="modal" v-if="a">
			<view>
			   <image @click="close_btn_C()" v-if="closeModal" class="close_but" src="../../static/record/close.png"  ></image>
			   <view class="praise">
				<view class="praisebg">
					 <image class="share_bg" src="../../static/record/sharebg.png"/>
					<view class="userIcon">
						<image class="serIcon" :src="avatarUrl"></image>
					</view>
					<view class="nickName1">
						<text class="nickName">{{nickNames}}</text>
						<view class="time">{{time}}</view>
					</view>
					<view class="fxjq">
						<view class="num_l"><text class="num">{{date_all}}</text>天减轻<text class="num">{{last}}</text>斤</view>
					</view>
					<view class="count">
						<view class="pr-l">
							<view class="val">{{day_weight_int}}</view>
							<sub class="axe_l">斤</sub>
							<view class="weight_float">.{{day_weight_float}}</view>
						</view>
						<view class="fall">
							<image class="fall-l" src="../../static/fall.png"></image>
							<text class="digit">{{last_int}}</text>
							<sub class="axe_2">斤</sub>
							<text class="last_float">.{{last_float}}</text>
							<view class="ratio">比{{ratio}}</view>
						</view>
					</view>
			   </view>
			   <view class="order" @click="openShare()">
			     <text class="jianfei">减肥日记小程序</text>
			   <image class="baidu" src="../../static/record/baidu.png"></image>
			   </view>
			   <image class="qr_code" src="../../static/record/qr_code.png"></image>
			  </view>
			</view>
		</view> -->
		<!-- 五星好评 -->
		<view class="appraise" v-if="assess" @click="guanbi()">
			<image class="assess" src="../../static/assess.png" />
		</view>
	</view>
</template>

<script>
	import store from 'store';
	import {
		login,
		is_login
	} from '@/pages/login/login.js';
	//模态框
	import luPopupWrapper from "@/components/lu-popup-wrapper/lu-popup-wrapper.vue";
	//柱状图
	import uCharts from '@/components/u-charts/u-charts.js';
	import {
		isJSON
	} from '@/common/checker.js';
	//获取日期
	import DateFormat from '@/components/js_sdk/xfl-DateFormat/DateFormat.js';
	var _self;
	var canvaColumn = null;
	var start = 0;
	var end = 0;
	var move = 0;
	var _date_ = new DateFormat(new Date());
	_date_ = _date_.toString("yyyy-mm-dd");
	console.log(_date_,'333333333333333333333333 _date_');
	uni.request({
		url:store.state.URL + "rwd/select_weight/transformation",
		data: {
			choose_date:_date_,
			num:-3
		},
		success(res) {
			_date_ = res.data.date;
		}
	});	
	var _currentOffset_ = 0;
	var num = 0;
	export default {
		components: {
			startDate() {
				return this.getDate('start');
			},
			endDate() {
				return this.getDate('end');
			},
			luPopupWrapper
		},
		data() {
			const currentDate = this.getDate({
				format: true,
			});
			return {
				pickershow:true,//显示和隐藏日期
				date_all: ' 0 ',
				weight: ' 0 ',
				type: "bottom", // left right top bottom center
				transition: "slider", //none slider fade
				backgroundColor: '#FFFFFF',
				active: false,
				height: "100%",
				width: "100%",
				popupId: 0,
				maskShow: true,
				maskClick: false,
				date: 'currentDate',
				date_num: '0.0',
				date_num_key: '',
				target_weight: '', //目标体重
				day_weight: '0.0',
				day_weight_int: '0', //整数
				day_weight_float: '0', //小数点
				punch: '今天未记录',
				last: '-- ',
				// last_int:'',
				// last_float:'',
				distance: '--',
				ok: '../../static/ok.png',
				notarget: '../../static/notrecorded.png',
				cWidth: '',
				cHeight: '',
				pixelRatio: 1,
				textarea: '',
				Supplementary_weight: '', //补记体重
				category: '', //补记体重选择的时间
				item: '', //补记体重选择的体重
				future: '',//是否为今天之后
				// a: false,
				// nickNames: '百度网友',
				// avatarUrl: "https://b.bdstatic.com/searchbox/image/cmsuploader/20180821/1534857615114422.png",
				// time:'',
				ratio: '',
				digit: false,
				closeModal: true,
				assess: false, //五星好评
				riqi: ['8月19日', '8月20日'],
				riqi_key: 0,
				tips: '',
				token: '',
				maxa: '500',
				minn: '200',
				carryout: false,
				weeki:0,
				ononday:'09月23日-09月29日',
				showbtn:true,
				showleft:true,
				weeks:[
					{name:'周一'},
					{name:'周二'},
					{name:'周三'},
					{name:'周四'},
					{name:'周五'},
					{name:'周六'},
					{name:'周日'}
				],
				no_target: true,
				screenHeight: 0, //获取手机的屏幕高度
				canvashide: true, //隐藏画布
				choose_date: '', //今天时间
				hasOnShow: false,
				//fan: 0, //更新柱状图目标体重
				//is_jt: 0, //回到今天滑动处理
			}
		},
		onShareAppMessage(res) {
			if (res.from === 'button') { // 来自页面内分享按钮
				console.log(res.target)
			}
			return {
				title: '减肥日记',
				content: '减肥路上,一直陪伴在你身边的小工具',
				path: '/pages/record/record'
			}
		},
		onLoad: function() {
			var that = this;
			that.token = uni.getStorageSync('token');
			that.cWidth = uni.upx2px(750);
			uni.getSystemInfo({
				success: function(res) {
					console.log(res.screenHeight, '手机高度1');
					that.screenHeight = res.screenHeight;
					console.log(that.screenHeight - 50, 'that手机高度');
					that.cHeight = that.screenHeight / 2 -130;
				}
			});
		},
		onShow: function() {
			if(this.hasOnShow){
				return
			}
			this.hasOnShow = true;
			console.log('onShowonShowonShowonShowonShowonShow')
			this.token = uni.getStorageSync('token');
			this.getData();
			this.weeki = 0;
			_self = this;
			_self.showbtn=false;
			// _self.logs("onShow",_date_);
			//#ifdef MP-ALIPAY
			uni.getSystemInfo({
				success: function(res) {
					if (res.pixelRatio > 1) {
						//正常这里给2就行，如果pixelRatio=3性能会降低一点
						//_self.pixelRatio =res.pixelRatio;
						_self.pixelRatio = 2;
					}
				}
			});
			//#endif

		},
		onHide() {
			this.hasOnShow = false;
		},
		onUnload() {
			this.hasOnShow = false;
		},
		methods: {
			getData() {
				// this.fan = 1;
				//判断是否登录
				var that = this;
				console.log(uni.getStorageSync, 'uni.getStorageSync');
				that.token = uni.getStorageSync('token');
				console.log(that.token, 'that.token2');
				const userInfo = uni.getStorageSync('userInfo');
				// that.nickNames = userInfo.nickName;
				// that.avatarUrl = userInfo.avatarUrl;
				var d = new Date();
				var d_y = d.getFullYear(); //年
				var d_m = d.getMonth() + 1; //月
				var d_d = d.getDate(); //日
				var d_yd = d.getDate() - 1;
				var choose_date = d_y + '-' + d_m + '-' + d_d;
				// var time= d_y + '.' + d_m+'.'+d_d;
				// var ratio=  d_m+'月'+d_yd+'日';
				//this.time=time;//分享时模态框的当前时间；
				//this.ratio=ratio;//分享时模态框的比昨天时间；
				//console.log(time,'time');//分享时模态框的当前时间；
				//console.log(ratio,'ratio');
				console.log(choose_date);
				console.log(that.token, 'that.token');
				if (that.token == '') {
					that.day_weight = '0.0';
					that.date_all = ' 0 ';
					that.last = '-- ';
					that.target_weight = '';
					that.no_target = true;
					that.weight = '0';
					that.distance = '-- ';
					that.punch = '今天未记录';
				}
				uni.request({ //今天记录体重信息
					url: store.state.URL + "rwd/select_weight/day_select", //获取数据
					data: {
						token: that.token,
						choose_date,
					},
					method: 'POST',
					 header:{
					  'content-type':'application/x-www-form-urlencoded',
					},
					success(res) {
						that.choose_date = choose_date;
						console.log(res);
						is_login(res);
						// console.log(res.data.is_one,'柱状图弹窗');
						//显示数据day_weight
						if (res.data.weight_day == null) res.data.weight_day = '0.0';
						else that.day_weight = res.data.weight_day;
						that.date_all = res.data.record_date;
						that.last = res.data.yesterday_compare; //比昨天
						console.log(that.last, '比昨天');
						//that.target_weight = res.data.target_weight;//目标体重
						if (res.data.target_weight > 0) {
							that.no_target = false;
							that.target_weight = res.data.target_weight;
						}
						console.log(that.target_weight, 'that.target_weight');
						if (res.data.distance_target === "已达成") {
							that.carryout = true
						} else {
							that.distance = res.data.distance_target
						}
						// console.log(res.data.distance_target, '返回');
						that.weight = res.data.reduce_weight;
						console.log(that.punch,'今日未记录');
						if (that.day_weight >= 1) that.punch = "今日体重";
						console.log(that.day_weight,'今天体重++++++++++++++++');
						that.maxa = res.data.max;
						that.minn = res.data.min;

						//今日体重处理
						console.log(that.day_weight, 'that.day_weight');
						var str = that.day_weight.toString();
						var n = str.split(".");
						if (that.day_weight_float === undefined) {
							that.day_weight_float = 0;
						}
						that.day_weight_int = n[0];
						console.log(that.day_weight_int, 'that.day_weight_int');
						that.day_weight_float = n[1];
						console.log(that.day_weight_float, 'day_weight_float');
						//分享比昨天的体重
						var str = that.last.toString();
						var n = str.split(".");
						if (n[1] === undefined) {
							n[1] = 0;
						}
						that.last_int = n[0];
						that.last_float = n[1];
						console.log(that.last_int, 'that.last_int');
						console.log(n[1], 'n[1]');

						//未登录状态

						if (res.date_all.status == false) {
							that.day_weight = '0.0';
							that.date_all = ' 0 ';
							that.last = '-- ';
							that.target_weight = '0.0';
							that.weight = '0';
							that.distance = '-- ';
						}
					},
					fail() {
						console.log("失败1111111111111");
					}
				});
				console.log('????????????????');
				this.getServerData(_date_);
			},
			denglu() {
				//let self = this;
				login().then(res => {
					//登录成功
					this.getData();
				}).catch(err => {
					// 登录失败
					console.log(err);
				});
			},
			closeC() {
				this.digit = false;
				uni.showTabBar({});
			},
			// showModal(){
			// 	this.a = true;
			// },
			guanbi() {
				this.assess = false;
			},
			//分享
			close_btn_C() {
				this.a = false;
			},
			getServerData(date) {
				let self = this;
				var riqi_arr = [];
				uni.request({
					url: store.state.URL + "rwd/select_weight/histogram",//时间请求
					data: {
						token: self.token,
					},
					success: function(res) {
						console.log(res);
						const date = new Date();
						let month = date.getMonth() + 1;
						let day = date.getDate();
						for (let i in res.data.histogram.chartData.categories) {
							var riqi_m = res.data.histogram.chartData.categories[i].substring(0, 2);
							var riqi_d = res.data.histogram.chartData.categories[i].substring(3, 6);
							if (i > 350 && parseInt(riqi_d) + 1 == day) {
								var riqi_all = riqi_m + '月' + riqi_d + '日(昨天)';
							} else if (i > 360 && parseInt(riqi_d) + 2 == day) {
								var riqi_all = riqi_m + '月' + riqi_d + '日(前天)';
							} else {
								var riqi_all = riqi_m + '月' + riqi_d + '日';
							}
							if (riqi_all == "今天月日") {
								if (month >= 10) {
									if (day >= 10) riqi_all = month + '月' + day + '日(今天)';
									else riqi_all = month + '月' + '0' + day + '日(今天)';
								} else {
									//riqi_all = '0'+month+'月'+day+'日(今天)';
									if (day >= 10) riqi_all = '0' + month + '月' + day + '日(今天)';
									else riqi_all = '0' + month + '月' + '0' + day + '日(今天)';
								}
							}
							riqi_arr.push(riqi_all);
						}
						riqi_arr.reverse();
						if (riqi_arr != []) {
							self.riqi = riqi_arr;
						}
					},
					fail: () => {
						_self.tips = "网络错误，小程序端请检查合法域名2";
					},
				});
				uni.request({
					url: store.state.URL + "rwd/select_weight/page_turning",//柱状图的数据请求
					data: {
						token: self.token,
						num: 0,
					},
					success: function(res) {
						self.ononday=res.data.date_date;
						console.log(res.data.date_date,'------------6666');
						console.log(res,'-----888-------');
						is_login(res);
						let Column = {categories: [],series: []};
						//这里掌邦的数组
						Column.categories = res.data.histogram.chartData.categories;
						Column.series = res.data.histogram.chartData.series;
						// Column.series[0].format = (val) => {
						// 	if (val == 0) {
						// 		return "0.0"
						// 	} else {
						// 		return val
						// 	}
						// };
						_self.textarea = JSON.stringify(res.data.histogram.chartData);
						_self.showColumn("canvasColumn", Column);
					},
					fail: () => {
						_self.tips = "网络错误，小程序端请检查合法域名3"+date;
					},
				});
			},
			showColumn(canvasId, chartData) {
				this.token = uni.getStorageSync('token');
				console.log(chartData, '33333333333333333333');
				var t_w = '';
				//this.token = uni.getStorageSync('token');
				if (this.token == '') {
					t_w = 120;
				} else {
					t_w = this.target_weight;
				}
				console.log(this.token, 'this.token5555555555555555555555555');
				console.log(t_w, '88888');
				console.log(this.target_weight, 'this.target_weight');
				var max = this.maxa ? this.maxa : 500;
				var min = this.minn ? this.minn : 20;
				canvaColumn = new uCharts({
					$this: _self,
					canvasId: canvasId,
					type: 'column',
					fontSize: 11,
					padding: [10, 0, 15, 0],
					legend: {
						show: false,
						position: 'top',
						float: 'center',
						itemGap: 30,
						padding: 5,
						margin: 5,
						borderWidth: 1
					},
					scrollPosition: 'current',
					dataLabel: true,
					dataPointShape: true,
					background: '#FFFFFF',
					pixelRatio: _self.pixelRatio,
					categories: chartData.categories,
					series: chartData.series,
					animation: true,
					// enableScroll: false,
					xAxis: {
						disableGrid: false,
						//type:'none',
						gridColor: '#FFFFFF',
						itemCount: 7,
						scrollShow: false,
						scrollAlign: 'right',
					},
					yAxis: {
						data: [{
							position: 'left',
							disabled: false,
							format: (val) => {
								return val.toFixed(1)
							},
							min: min,
							max: max+3,
						}],
						showTitle: false,
						disabled: true,
						disableGrid: true,
					},
					width: _self.cWidth * _self.pixelRatio,
					height: _self.cHeight * _self.pixelRatio,
					enableMarkLine: true,
					extra: {
						tooltip: {
							showBox: false, //是否显示半透明黑色的提示区域
							activeBgColor: '#FFFFFF', //主体背景颜色
							activeBgOpacity: 0,
						},
						column: {
							type: 'group',
							width: 30,
						},
						markLine: {
							type: 'dash',
							dashLength: 2,
							data: [{
								value: t_w,
								lineColor: '#F47C7B',
								showLabel: true,
								labelBgOpacity: '0',
								labelBgColor: '#FFFFFF',
							}]
						}
					},
				});
				console.log(canvaColumn, "canvaColumn");
			},
			touchColumn(e) {
				let self = this;
				console.log('--------category----------1');
				canvaColumn.showToolTip(e, {
					format: function(item, category) {
						
						
						}
				});
				
	    canvaColumn.touchLegend(e,{animation:true});		
			},
	       // 日期
			bindDateChange: function(e) {
				this.date = e.target.value;
				this.riqi_key = e.target.value;
				
				let test = this.riqi_key;
				//console.log(this.riqi[test], 'riqi[riqi_key]'); //9月2日 => 2019-09-02
				let yue = this.riqi[test].substr(0, 2);
				let ri = this.riqi[test].substr(3, 2);
				let d = new Date();
				let d_y = d.getFullYear(); //获取当前年
				// console.log(d_y, 'd_y');
				// console.log(typeof d_y, 'type_d_y');
				let d_m = d.getMonth() + 1; //获取当前月
				let d_d = d.getDate(); //获取当前日
				if (d_m <= yue) {
					if (d_m != yue) {
						d_y = d_y - 1;
					} else {
						if (d_d < ri) {
							d_y = d_y - 1;
						}
					}
				}
				d_y = d_y.toString();
				this.date = d_y + '-' + yue + '-' + ri;
				let shijuan = this.date 
				let choose_date= shijuan;
				// console.log(e.target.value, 'e.target.value');
				let that = this;
				const token = uni.getStorageSync('token');
				uni.request({
					url: store.state.URL + "rwd/select_weight/day_select",
					data: {
						token:token,
						choose_date:choose_date,
					},
					success(res) {
						console.log(res.data.weight_day,'?????');
						console.log(that.date_num,'????333333333');
						res.data.weight_day ? res.data.weight_day : res.data.weight_day = '0.0';
						that.date_num=res.data.weight_day;
						
					},
					fail() {
						console.log('失败');
					}
				});
				
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();

				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			bottom: function(e) {
				let that = this;
				//this.date_num_key = e;
				//console.log(e,'this.date_num_key23333333333333');
				that.token = uni.getStorageSync('token');
				if (that.token == "") {
					if (e != 'Supplementary_weight' && e != 'target_weight') {
						// that.denglu(that);
						that.canvashide = true;
						uni.login({
							provider: 'baidu',
							success: function(loginRes) {
								//console.log(loginRes);
								// 获取用户信息
								uni.getUserInfo({
									provider: 'baidu',
									success: function(infoRes) {
										if (infoRes.is_anonymous) {
											console.log('拒绝');
											that.canvashide = true;
											uni.showToast({
												title: '未登录',
												icon: 'none',
												duration: 2000
											});
										} else {
											that.denglu(that);
											// console.log(that.choose_date, 'that.choose_date333333333333');
											// console.log(that.token, '333333333333333  that.token');
											that.canvashide = true;
											console.log('登录成功!');
										}
									},
									fail: function() {
										console.log('拒绝(假)');
									}
								});
							}
						});
					} else {
						// that.denglu(that);
						that.canvashide = true;
					}
				} else {
					if(this.future != "#999999"){
						this.width = "100%";
						this.height = "82%";
						this.transition = "slider";
						this.type = "bottom";
						this.show();
						console.log('+++++++++++');
					}else if(this.future == "#999999"){
						this.future = '';
						uni.showToast({
							icon: 'none',
							title: '未到当前日期',
							duration: 1000
						})
						this.close();
					}
				}
				console.log(this.token, 'this.token');

			},
			positioning: function() { //点击右箭头定位今天
				console.log('向右翻页!')
			},
			show: function() {
				this.$refs.luPopupWrapper.show();
				uni.hideTabBar();
			},
			close: function() {
				let that = this;
				that.$refs.luPopupWrapper.close();
				uni.showTabBar();
				that.canvashide = true;
				that.pickershow = true;
				//if (this.date_num_key != 'Supplementary_weight') {
					uni.request({
						url: store.state.URL + "rwd/select_weight/page_turning", //关掉X请求画布
						data: {
							token: that.token,
							num: that.weeki,
						},
						success: function(res) {
							console.log(res);
							let Column = {categories: [],series: []};
							//这里掌邦的数组
							that.ononday=res.data.date_date;
							Column.categories = res.data.histogram.chartData.categories;
							Column.series = res.data.histogram.chartData.series;
							Column.series[0].format = (val) => {
								if (val == 0) {
									return "0.0"
								} else {
									return val
								}
							};
							_self.textarea = JSON.stringify(res.data.histogram.chartData);
							_self.showColumn("canvasColumn", Column);
						},
						fail: () => {
							_self.tips = "网络错误，小程序端请检查合法域名";
						},
					});
				//}

			},
			closeCallback: function() {
				console.log("关闭后回调");
			},
			Preservation: function(e) {//保存
				console.log(this.category,'+++++?????++++++++' );
				var that = this;
				uni.request({ //是否弹窗评价
					url: store.state.URL + "rwd/five_comment/is_trigger",
					data: {
						token: that.token,
					},
					success(res) {
						console.log(res.data.status, '3333333333 res.data.status');
						if (res.data.status == true) {
							that.assess = true;
						}
					},
					fail() {
						console.log('五星好评请求失败');
					}
				});
				that.is_jt = 1;
				if (this.date_num_key == 'weight') {
					that.weeki = 0;
					that.showbtn=false;
					let test = that.riqi_key;
					console.log(that.riqi[test], 'riqi[riqi_key]');
					var yue = that.riqi[test].substr(0, 2);
					var ri = that.riqi[test].substr(3, 2);
					var d = new Date();
					var d_y = d.getFullYear(); //获取当前年
					console.log(d_y, 'd_y');
					console.log(typeof d_y, 'type_d_y');
					var d_m = d.getMonth() + 1; //获取当前月
					var d_d = d.getDate(); //获取当前日
					var jtsj=d_y+'-'+d_m+'-'+d_d;//今天时间
					console.log(jtsj,'that.datethat.datethat.datethat.datethat.date');
					if (d_m <= yue) {
						if (d_m != yue) {
							d_y = d_y - 1;
						} else {
							if (d_d < ri) {
								d_y = d_y - 1;
							}
						}
					}
					d_y = d_y.toString();
					that.date = d_y + '-' + yue + '-' + ri;
					that.day_weight = that.date_num;
					if (that.date_num >= 20) {
						//写请求，保存体重信息
						var choose_date = that.date;
						var weight = that.date_num;
						uni.request({
							url: store.state.URL + "rwd/record_weight/record_weight",
							data: {
								token: that.token,
								choose_date,
								weight,
							},
							success(res) {
								console.log(res,'res');
								// 今天日期  
								if(res.data.status==true &&  jtsj==choose_date ){
									if (that.day_weight >= 1) that.punch = "今日体重";
								}
								uni.request({
									url:store.state.URL + "rwd/select_weight/transformation",
									data: {
										choose_date:choose_date,
										num:-3
									},
									success(res) {
										choose_date = res.data.date;
										uni.request({
											url: store.state.URL + "rwd/select_weight/page_turning", //保存今日体重后请求画布
											data: {
												token: that.token,
												num: 0,
												// num: choose_date,
											},
											success: function(res) {
												console.log(choose_date,'choose_date-------'+ that.weeki);
												console.log(res);
												that.ononday=res.data.date_date;
												let Column = {categories: [],series: []};
												//这里掌邦的数组
												Column.categories = res.data.histogram.chartData.categories;
												Column.series = res.data.histogram.chartData.series;
												Column.series[0].format = (val) => {
													if (val == 0) {
														return "0.0"
													} else {
														return val
													}
												};
												_self.textarea = JSON.stringify(res.data.histogram.chartData);
												_self.showColumn("canvasColumn", Column);
											},
											fail: () => {
												_self.tips = "网络错误，小程序端请检查合法域名";
											},
										});
									}
								});
									
								//3秒模态框
								if (res.data.is_one == 1) {
									that.digit = true;
									uni.hideTabBar({});
									console.log(that.digit, 'ssssssssssssssssssss');
								} else {
									console.log('dddddddddddddddd');
								}
								that.token = uni.getStorageSync('token');
								choose_date = that.choose_date;
								uni.request({
									url: store.state.URL + "rwd/select_weight/day_select", //更新数据
									data: {
										token: that.token,
										choose_date,
									},
									success(res) {
										that.date_all = res.data.record_date;
										that.weight = res.data.reduce_weight;
										console.log(res, 'res');
										let weight = res.data.weight_day;
										let str = weight.toString();
										let float = '0';
										var n = str.split(".");
										if (n[1] == undefined) {
											float = 0;
										} else {
											float = n[1];
										}
										that.day_weight_int = n[0];
										that.day_weight_float = float;
										console.log(res, '保存体重信息成功返回');
										that.last = res.data.yesterday_compare;
										if (res.data.distance_target == "已达成") {
											that.carryout = true
										} else if (res.data.distance_target != "已达成") {
											that.carryout = false;
											that.distance = res.data.distance_target;
										}
									},
									fail() {
										console.log('失败!');
									}
								});
								if (res.data.status) {
									uni.showToast({
										title: res.data.msg,
										icon: 'none',
										duration: 1000
									});
								}
							},
							fail() {
								console.log('失败');
							},
						});
						console.log(that.date, 'date');
					} else {
						console.log(that.canvashide, '1');
						uni.showToast({
							title: '体重太小最少20斤',
							icon: 'none',
							duration: 1000
						});
					}
				} else if (that.date_num_key == 'target_weight') {
					//写请求，保存目标体重
					that.pickershow = true;
					console.log(that.target_weight); //判断它
					if (that.date_num >= 20) {
						that.target_weight = that.date_num;
						var target_weight = that.target_weight;
						uni.request({
							url: store.state.URL + "rwd/login_user/user_record",
							data: {
								token: that.token,
								target_weight
							},
							success(res) {
								console.log(res);
								if (that.target_weight > 0) {
									that.no_target = false;
								} else {
									that.target_weight = target_weight;
								}
								that.token = uni.getStorageSync('token');
								choose_date = that.choose_date;
								uni.request({
									url: store.state.URL + "rwd/select_weight/day_select", //更新数据
									data: {
										token: that.token,
										choose_date,
									},
									success(res) {
										that.date_all = res.data.record_date;
										that.weight = res.data.reduce_weight;
										//更新目标体重线
										var d = new Date();
										var d_y = d.getFullYear(); //获取当前年
										var d_m = d.getMonth() + 1; //获取当前月
										var d_d = d.getDate(); //获取当前日
										let aims = d_y + '-' + d_m + '-' + d_d;
									uni.request({
									url:store.state.URL + "rwd/select_weight/transformation",
									data: {
										choose_date:choose_date,
										num:-3
									},
									success(res) {
										choose_date = res.data.date;
										uni.request({
											url: store.state.URL + "rwd/select_weight/page_turning", //保存目标体重后
											data: {
												token: that.token,
												num: that.weeki,
											},
											success: function(res) {
                                                console.log(that.weeki,'that.weeki======,')
												console.log(res);
												that.ononday=res.data.date_date;
												let Column = {categories: [],series: []};
												//这里掌邦的数组
												Column.categories = res.data.histogram.chartData.categories;
												Column.series = res.data.histogram.chartData.series;
												Column.series[0].format = (val) => {
													if (val == 0) {
														return "0.0"
													} else {
														return val
													}
												};
												_self.textarea = JSON.stringify(res.data.histogram.chartData);
												_self.showColumn("canvasColumn", Column);
											},
											fail: () => {
												_self.tips = "网络错误，小程序端请检查合法域名";
											},
										});
									}
								});
										that.last = res.data.yesterday_compare;
										that.target_weight = res.data.target_weight;
										console.log(res.data.yesterday_compare, 'that.last比昨天');
										if (res.data.distance_target == "已达成") {
											that.carryout = true
										} else if (res.data.distance_target != "已达成") {
											that.carryout = false;
											that.distance = res.data.distance_target;
										}
									},
									fail() {
										console.log('失败!');
									}
								});
							},
							fail() {
								console.log('失败');
							},
						})
					} else {
						uni.showToast({
							title: '体重太小最少20斤',
							icon: 'none',
							duration: 1000
						})
					}
				} else if (that.date_num_key == 'Supplementary_weight') {
					that.is_jt = 0;
					that.Supplementary_weight = that.date_num;
					//写请求，补记体重
					// var choose_date = that.category;
					var choose_date;
					if(that.date=="currentDate"){
						choose_date = that.category;
					}else{
					    choose_date=that.date;
						that.date = "currentDate";
					}
					console.log(that.date,that.category,'11111');
					console.log(choose_date,'1111133333333333');
					//判断今天之后保存去年日期
					//柱状图今天之后为去年
					// var bc = new Date();
					// var bc_y = bc.getFullYear();
					// var bc_m = bc.getMonth() + 1;
					// var bc_d = bc.getDate();
					// var choose_date_p = choose_date.substr(6, 1);//判断
					// var choose_date_m;
					// var choose_date_d
					// if(choose_date_p == '-'){
					// 	choose_date_m = choose_date.substr(5, 1);
					// 	choose_date_d = choose_date.substr(7, 2);
					// }else{
					// 	choose_date_m = choose_date.substr(5, 2);
					// 	choose_date_d = choose_date.substr(8, 2);
					// }
					// console.log(choose_date,'choose_date',choose_date_m,'choose_date_m',choose_date_d ,'choose_date_d');
					// if (choose_date == '今天') {
					// 	choose_date = bc_y + '-' + bc_m + '-' + bc_d;
					// } else if (choose_date_m > bc_m) {
					// 	choose_date = (parseInt(bc_y) - 1) + '-' + choose_date_m + '-' + choose_date_d;
					// } else if (choose_date_m < bc_m) {
					// 	choose_date = bc_y + '-' + choose_date_m + '-' + choose_date_d;
					// } else if (choose_date_m == bc_m) {
					// 	if (choose_date_d > bc_d) {
					// 		choose_date = (parseInt(bc_y) - 1) + '-' + choose_date_m + '-' + choose_date_d;
					// 	} else if (choose_date_d <= bc_d) {
					// 		choose_date = bc_y + '-' + choose_date_m + '-' + choose_date_d;
					// 	}
					// }
					console.log(that.category, 'this.category');
					console.log(that.Supplementary_weight, 'this.date_num');
					var weight = that.Supplementary_weight;
					if (weight >= 20) {
						uni.request({
							url: store.state.URL + "rwd/record_weight/record_weight",
							data: {
								token: that.token,
								choose_date,
								weight,
							},
							success(res) {
								let numl = that.weeki;
								uni.request({
									url: store.state.URL + "rwd/select_weight/page_turning", //补记体重后
									data: {
										token: that.token,
										num: numl,
									},
									success: function(res) {
										let Column = {categories: [],series: []};
										//这里掌邦的数组
										that.ononday=res.data.date_date;
										Column.categories = res.data.histogram.chartData.categories;
										Column.series = res.data.histogram.chartData.series;
										Column.series[0].format = (val) => {
											if (val == 0) {
												return "0.0"
											} else {
												return val
											}
										};
										_self.textarea = JSON.stringify(res.data.histogram.chartData);
										_self.showColumn("canvasColumn", Column);
									},
									fail: () => {
										_self.tips = "网络错误，小程序端请检查合法域名";
									},
								});
									/* }
								}); */
								that.token = uni.getStorageSync('token'); //在柱状图里添加今天的体重
								choose_date = that.choose_date;
								uni.request({
									url: store.state.URL + "rwd/select_weight/day_select", //更新数据
									data: {
										token: that.token,
										choose_date,
									},
									success(res) {
										that.date_all = res.data.record_date;
										that.weight = res.data.reduce_weight;
										console.log(res, '成功更新数据');
										console.log(res.data.weight_day, '今天体重');
										let weight = res.data.weight_day;
										if (weight >= 1){
											that.punch = "今日体重";
										}
										console.log(weight, '成功更新数据');
										let str = weight.toString();
										let n = str.split(".");
										if (n[1] === undefined) {
											that.day_weight_float = 0;
										} else {
											that.day_weight_float = n[1]
										}
										that.day_weight_int = n[0];
										that.day_weight_float = that.day_weight_float;
										console.log(that.day_weight_float, 'that.day_weight_float');
										that.last = res.data.yesterday_compare;
										console.log(res.data.yesterday_compare, 'that.last比昨天');
										if (res.data.distance_target == "已达成") {
											that.carryout = true
										} else if (res.data.distance_target != "已达成") {
											that.carryout = false;
											that.distance = res.data.distance_target;
										}
										console.log('补记体重');
									},
									fail() {
										console.log('失败!');
									}
								});

							},
							fail() {
								console.log('失败');
							},
						})
					} else {
						uni.showToast({
							title: '体重太小最少20斤',
							icon: 'none',
							duration: 1000
						})
					}
				}
				if(that.date_num >= 20 || weight >= 20){
					that.$refs.luPopupWrapper.close();
					uni.showTabBar();
					that.canvashide = true;
				}
			},
			board: function(e) {
				this.canvashide = false;
				this.date_num_key = e.currentTarget.dataset._text;
				if (this.date_num_key == 'weight') { //键盘存的是今天体重
					
					this.riqi_key = 0;
					this.date_num = this.day_weight; //{{day_weight}}
					this.tips = '';
				} else if (this.date_num_key == 'target_weight') { //键盘存的是目标体重
					this.pickershow = false;
					this.tips = '设置目标体重';
					this.date_num = this.target_weight;
					console.log(this.date_num,'--------------目标体重');
				} else if (this.date_num_key == 'Supplementary_weight') { //键盘存的是补计体重
					this.tips = '';
					//this.Supplementary_weight = this.item;
					//console.log(this.Supplementary_weight,'this.Supplementary_weight',this.category,'category33333333333');
					//this.date_num = this.Supplementary_weight;//{{Supplementary_weight}}
					let self = this;
					console.log(canvaColumn);
					canvaColumn.showToolTip(e, { //补记体重的时间  自定义补记体重键盘值
						format: function(item, category) {
							// self.item = item.data.value;
							
							
							
							
							
							self.date_num=item.data.value;

							console.log(item.data.value,'item.data.value');
							self.future = item.data.color;
							self.category=category;
							console.log(self.category, 'item333333333333+++++++++++++');
							console.log(category,'item+++++++++++++???');
							
							var d = new Date();
							var d_y = d.getFullYear();
							var d_m = d.getMonth() + 1;
							var d_d = d.getDate();
							var category_m = category.substr(0, 2);
							var category_d = category.substr(3, 2);
							if (category == '今天') {
								category = d_y + '-' + d_m + '-' + d_d;
								self.category = category;
								console.log(category,'等于今天');
							} else if (category_m > d_m) {
								category = (parseInt(d_y) - 1) + '-' + category_m + '-' + category_d;
								self.category = category;
							} else if (category_m < d_m) {
								category = d_y + '-' + category_m + '-' + category_d;
								self.category = category;
							} else if (category_m == d_m) {
								
								if (category_d > d_d) {
									category = (parseInt(d_y) - 1) + '-' + category_m + '-' + category_d;
									self.category = category;
								} else if (category_d <= d_d) {
									category = d_y + '-' + category_m + '-' + category_d;
									self.category = category;
								}
								
								category = d_y + '-' + category_m + '-' + category_d;
								console.log(category,'============?');
								self.category = category;
							}
							//循环数组
							//2019-09-05 => 09月05日
							let data_temp_m = self.category.substr(5, 2);
							let data_temp_d = self.category.substr(8, 2);
							let data_temp = data_temp_m + '月' + data_temp_d + '日'; //点击柱状图的时间
							let data_temp_j = data_temp_m + '月' + data_temp_d + '日(今天)';
							console.log(data_temp_j,'data_temp_j+data_temp_j');
							let data_temp_z = data_temp_m + '月' + data_temp_d + '日(昨天)';
							let data_temp_q = data_temp_m + '月' + data_temp_d + '日(前天)';
							let index_temp = 0;
							for (let k in self.riqi) {
								if (self.riqi[k] == data_temp) {
									index_temp = k;
									break;
								} else if (self.riqi[k] == data_temp_j) {
									index_temp = k;
									break;
								} else if (self.riqi[k] == data_temp_z) {
									index_temp = k;
									break;
								} else if (self.riqi[k] == data_temp_q) {
									index_temp = k;
									break;
								}
							}
							self.riqi_key = index_temp;
							console.log(self.riqi_key,data_temp,index_temp,'riqi_key+index_temp');
						},
					});
					// console.log(that.item, 'item555555555555');
					// if (that.item == "未记录") {
					// 	that.date_num = '0.0';
					// } else {
					// 	that.date_num = that.item;
					// }
				}
			},
			keyboard: function(e) {
				if (this.date_num.toString().substring(0, 3) == '0.0') {
					this.date_num = this.date_num.toString().substring(3, this.date_num.length);
				}
				var input_length = 3;//100.0  99.0
				var is_spot = this.date_num.toString().substring(3,4);
				//console.log(is_spot,'is_spotis_spotis_spotis_spotis_spotis_spot');
				if(is_spot == '.'){
					input_length = 4;
				}
				
				if (e.currentTarget.dataset.text != 'del' && this.date_num.length <= input_length) {
					var max = this.date_num;
					max += e.currentTarget.dataset.text;
					if (max > 500) {
						uni.showToast({
							title: '不能大于500',
							icon: 'none',
							duration: 1000
						});
					} else {
						this.date_num += e.currentTarget.dataset.text;
					}
				}
				if (e.currentTarget.dataset.text == 'del') {
					this.date_num = this.date_num.toString().substring(0, this.date_num.length - 1);
				};
			},
			leftbtn:function(){
			    let that = this;
				console.log('向左加载!');
				that.weeki--;
				//let weei=that.weeki;
				if(that.weeki){
					that.showbtn=true;
				}
				if(that.weeki < -52 ){//let weei=that.weeki;
					that.showleft=false;
				}
				console.log(that.weeki,'+++');
				console.log(that.weeki,'that.weeki');
				uni.request({
					url: store.state.URL + "rwd/select_weight/page_turning", //补记体重后
					data: {
						token: that.token,
						num: that.weeki,
					},
					success: function(res) {
						console.log(that.weeki,'that.weeki-----');
						let Column = {categories: [],series: []};
						//这里掌邦的数组
						that.ononday=res.data.date_date;
						Column.categories = res.data.histogram.chartData.categories;
						Column.series = res.data.histogram.chartData.series;
						Column.series[0].format = (val) => {
							if (val == 0) {
								return "0.0"
							} else {
								return val
							}
						};
						_self.textarea = JSON.stringify(res.data.histogram.chartData);
						_self.showColumn("canvasColumn", Column);
					},
					fail: () => {
						_self.tips = "网络错误，小程序端请检查合法域名";
					},
				});
				//this.getServerData(this.current);//this.current
			},
			rightbtn:function(){
				let that = this;
				console.log('向右加载');
				if(that.weeki < 0){
					that.weeki++;
					if(that.weeki == 0 ){//let weei=that.weeki;
						that.showbtn=false;
					}
					//console.log(that.weeki,'+++');
				}
				if(that.weeki >= -52){
					that.showleft=true;
				}
				console.log(this.weeki,'this.weeki');
			    uni.request({
			    	url: store.state.URL + "rwd/select_weight/page_turning", //补记体重后
			    	data: {
			    		token: that.token,
			    		num: that.weeki,
			    	},
			    	success: function(res) {
			    		let Column = {categories: [],series: []};
			    		//这里掌邦的数组
						that.ononday=res.data.date_date;
			    		Column.categories = res.data.histogram.chartData.categories;
			    		Column.series = res.data.histogram.chartData.series;
			    		Column.series[0].format = (val) => {
			    			if (val == 0) {
			    				return "0.0"
			    			} else {
			    				return val
			    			}
			    		};
			    		_self.textarea = JSON.stringify(res.data.histogram.chartData);
			    		_self.showColumn("canvasColumn", Column);
			    	},
			    	fail: () => {
			    		_self.tips = "网络错误，小程序端请检查合法域名";
			    	},
			    });	
				
				
			},
		},
	}
</script>

<style>
	@font-face {
		font-family:'PingFangSC-Regular';
		font-family:'PingFangSC-Medium' ;
		font-family: 'DINPro-Regular';
		font-family: 'PingFangSC-Light';
		src:url('https://www.jianfeirj.com/font/PingFang%20Regular.ttf'),
			url('https://www.jianfeirj.com/font/PingFang%20Medium.ttf'),
		    url('https://www.jianfeirj.com/font/DINPro-Regular.otf'),
			url('https://www.jianfeirj.com/font/PingFang%20Light.ttf');
	}
	.modal_l {
		position: fixed;
		width: 100%;
		height: 55%;
		top: 0;
		left: 0;
		background: rgba(0, 0, 0, 0.5);
	}

	.appraise {
		position: fixed;
		width: 100%;
		height: 554upx;
		top: 0;
		left: 0;
		background: rgba(0, 0, 0, 0.5);
	}

	.assess {
		position: relative;
		height: 100upx;
		width: 300upx;
		left: 55%;
	}

	.prompt {
		position: absolute;
		height: 60upx;
		left: 14%;
		width: 530upx;
		bottom: 5upx;
		background-repeat: no-repeat;
	}

	.modify {
		position: absolute;
		left: 18%;
		bottom: 24upx;
		color: #000000;
		font-size: 24upx;
	}

	.digit_l {
		position: absolute;
		bottom: 30upx;
		left: 6%;
		padding-top: 15upx;
		text-align: center;
	}

	.close {
		margin-left: 25upx;
	}

	/* .modal{
		position: fixed;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		background: rgba(0,0,0,0.5);
	} */
	body {
		height: 100%;
	}

	.body {
		height: 100%;
		background-color: #FFFFFF;
	}

	.pr {
		position: relative;
		text-align: center;
		height: 88upx;
	}

	.record {
		position: relative;
		font-size: 24upx;
		font-family: PingFangSC-Light;
		top: 26upx;
		color: #FFFFFF;
	}

	.num {
		font-family:PingFangSC-Medium;
		font-size: 32upx;
		color: #FFFFFF;
	}

	.two {
		position: relative;
		height: 346upx;
		/* border: 1upx solid #000000; */
	}

	.circle {
		position: fixed;
		height: 260upx;
		width: 260upx;
		top: 126upx;
		right: 246upx;
		border-radius: 50%;
		background-color: #FFFFFF;
		opacity: 0;
		/* border: 1upx solid #000000; */
	}

	.three {
		/* top:380upx; */
		/* position: absolute; */
		position: relative;
		bottom: 10upx;
		height: 120upx;
	}

	/* .bg{
		position: relative;
		height: 100%;
	} */
	.bgImg {
		position: absolute;
		background-repeat: no-repeat;
		height: 554upx;
		width: 750upx;
	}

	.pr-s {
		position: relative;
		text-align:center;
		top: 90upx;
		color: white;
		font-family:PingFangSC-Light;
		font-size: 100upx;
		/* border:1upx solid #007AFF; */
	}

	.axe {
		position: relative;
		font-size: 24upx;
		bottom: 50upx;
		right: 2.5%;
	}

	.decimal {
		position: relative;
		font-family:PingFangSC-Light;
		font-size: 36upx;
	}

	.punch {
		position: relative;
		text-align: center;
		top: 56upx;
		margin: 14upx 0upx 14upx 0upx;
		font-size: 24upx;
		font-family:PingFangSC-Light;
		color:rgba(255,255,255,0.75)
	}
	.share {
		height: 46upx;
		width: 144upx;
		text-align: center;
		top: 56upx;
		/* margin-top:14upx; */
		color: #F47C7B;
		font-size: 28upx;
		line-height: 48.8upx;
		font-family: PingFangSC-Medium;
		border-radius: 30upx;
		/* border:1upx solid #007AFF; */
	}
	.share:after {
		border: none;
	}

	.flex-container {
		/* display: -webkit-flex; */
		display: flex;
		justify-content: center;
		align-items: center;
		width: 750upx;
		/* top: 10upx; */
	}

	.flex-item {
		width: 750upx;
		/* height: 34upx; */
		margin-top: 12upx;
		text-align: center;
		color: #FFFFFF;
		font-family: PingFangSC-Light;
		font-size: 24upx;
	}

	.num-2 {
		color: #FFFFFF;
		font-size: 48upx;
		/* font-family:DINPro-Regular; */
		margin-right: 6upx;
		font-family: PingFangSC-Light;
	}

	.pen {
		position: absolute;
		width: 40upx;
		height: 40upx;
		right: 49%;
		top: 23%;
	}

	.pen_catty {
		position: absolute;
		right: 45%;
		top: 28%;
		color: #FFFFFF;
		font-family: PingFangSC-Light;
		font-size: 24upx;
	}

	.out {
		position: absolute;
		width: 40upx;
		height: 40upx;
		right: 14%;
		top: 25%;
	}

	.flex-item-1 {
		width: 750upx;
		height: 34upx;
		/* margin: 5upx 10upx 10upx 10upx; */
		text-align: center;
		color:rgba(255,255,255,0.7);
		font-family: PingFangSC-Light;
		font-size: 24upx;
	}
    .four_hedaer{
		display: flex;
        flex-direction: column;
		height: 168upx;
        background: #FFFFFF;
	}
	.four {
		/* background-color: #2FC25B; */
		width: 750upx;
		height: 88upx;
		display: flex;
		align-content: center;
		justify-content: center;
		align-items: center;
	}
    .left_btn{
		position: absolute;
		left: 18upx;
		height: 56upx;
		width: 56upx;
	}
	.make {
		color: #333333;
		font-size: 30upx;
		/* font-family:PingFangSC-Light; */
		/* font-family: PingFangSC-Semibold; */
	}
	.makel{
		font-weight: bold;
	}
	.right_btn{
		position: absolute;
		right: 26upx;
		height: 56upx;
		width: 56upx;
	}
	.week{
		display:flex;
		align-items: center;
		justify-content: space-between;
		text-align: center;
		color: #666666;
		font-size: 24upx;
		font-family: PingFangSC-Regular;
		height: 60upx;
		/* margin-right:24upx ;
		margin-left:24upx ; */
		/* background: red; */
		/* border: 1upx solid #4CD964; */
	}
	.week_one{
		display: inline-block;
		width: 107upx;
		text-align: center;
		/* border: 1upx solid #007AFF; */
	}
	.right_arrow {
		position: relative;
		height: 50upx;
		width: 50upx;
		top: 20upx;
		left: 66%;
	}

	.qiun-charts{
		background-color: #FF0000;
		position: fixed;
		position: absolute;
		bottom: 0upx;
		width: 750upx;
	}
	.charts {
		background-color: #FFFFFF;
		/* position: fixed; */
		position: absolute;
		bottom: 5upx;
		width: 750upx;
	}

	.btn {
		border: 1upx solid #FF0000;
	}

	.keyboard {
		width: 100%;
		height: 75%;
	}

	.date_time {
		width: 100%;
		height: 12%;
		position: fixed;
		top: 0upx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-bottom: 1upx solid #E6E6E6;
		/* background: #2FC25B; */
	}

	.date_lower {
		width: 28upx;
		height: 14upx;
		margin-right: 20upx;
	}

	.cloce_father{
		position: fixed;
		right: 20upx;
		padding: 20upx 20upx 20upx 40upx;
		/* border:1px solid #007AFF; */
		text-align: center;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.cloce {
/* 		position: fixed;
		right: 50upx; */
		width: 30upx;
		height: 30upx; 
	}

	.show_date {
		width: 100%;
		height: 21%;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #999999;
		/* background:#0EA391; */
	}

	.date_num {
		font-size: 118upx;
		color: #333333;
	}

	.key_details {
		width: 100%;
		height: 86%;
	}

	.key {
		width: 33.3%;
		height: 22.5%;
		float: left;
		background-color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #666666;
		font-size: 60upx;
	}

	.del {
		width: 32upx;
		height: 32upx;
	}

	.sure {
		height: 14%;
		width: 100%;
		background-color: #FE827B;
		position: fixed;
		bottom: 0upx;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #FFFFFF;
		font-size: 46upx;
	}

	/* 点击分享模态框的样式 */
	/*. close_but{
      		position: absolute;
      		top: 1%;
      		right: 6%;
      		height: 50upx;
      		width: 50upx;
      	}
        .praise{
      	   position: absolute;   
           top: 6%;
           left: 5%;
      	   height: 564upx;
      	   width: 670upx;
      	   background-color: #FFFFFF;
      	   border: solid #FFFFFF;
      	   border: none;
      	   border-radius: 10upx;
        }
        .praisebg{
      	   position: relative;
      	   height: 430upx;
      	   width: 100%;
      	   background-repeat: no-repeat;
      	   border-bottom: 1upx solid #E6E6E6;
        }
        .share_bg{
      	  border-radius: 10upx 10upx 0 0;
      	  height: 430upx;
      	  width: 100%;
      	  
        }
        .serIcon{
      	 position: absolute;
      	 top: 30upx;
      	 left: 30upx;
      	 height:100upx;
      	 width: 100upx;
      	 border-radius: 50upx;
      }
      .nickName1{
      	 position: absolute;
      	 top:50upx;
      	 left:150upx;
      	 color: #333333;
      	 font-size: 32upx;
      	 font-family: 苹方,regular;
      }
      .time{
      	 margin-top:3upx;
      	 color:#999999;
          font-size: 16px;
      	 font-family:苹方,regular;
      }
      .static{
      	 position: absolute;
      	 top: 60upx;
      	 right:0upx;
      	 height: 50upx;
      	 width: 300upx;
      	 border-radius: 50upx;
      }
      .fxjq{
      		position: absolute;
      		top: 50upx;
             right:1upx;
      		border-radius: 30upx 0 0 30upx;
      		height: 50upx;
      		width: 250upx;
      		color:#FFFFFF ;
      		font-size: 24upx;
      		font-family: 苹方,light;
      		background-color: #FE827B;
      		box-shadow: -1px 1px 10px #FE827B;
      	}
      	.num_l{
      		margin-top: 5upx;
      		float: right;
      		margin-right: 28upx;
      	}
      	.num{
      		font-family: 苹方,regular;
      	 	font-size: 32upx;
      		color: #FFFFFF;
      	}
      	.count{
      		position: absolute;
      		bottom: 60upx;
      		height: 150upx;
      		width: 100%;
      		color:#333333;
      	}
      	.pr-l{
      		position: absolute;
      		left:70upx;
      		height: 100upx;
      	}
      	.val{
      		font-family:苹方,light;
      		font-size:104upx;
      	}
      	.axe_l{
      		position: absolute;
      		top:32upx;
      		font-size:24upx;
      		right: -16px;
      	}
		.weight_float{
			position: absolute;
			top:70upx;
			font-size: 36upx;
			right: -14px;
		}
      	.fall{
      	   display: -webkit-flex;
            display: flex;
            -webkit-flex-direction: row-reverse;
            flex-direction: row-reverse;
      	}
      	.fall-l{
      		position: absolute;
      		height: 44upx;
      		width: 24upx;
      		right: 200upx;
      		bottom: 50upx;
      	}
      	.digit{
      		position: absolute;
      		top:4upx;
      		font-family:苹方,light;
      		font-size:104upx;
      		right:70upx;
      	}
		.last_float{
		   	position: absolute;
		   	top:72upx;
		   	font-family:苹方,light;
		   	font-size:36upx;
		   	right:46upx;
		}
      	.axe_2{
      		position: absolute;
      		top:36upx;
      		font-size: 24upx;
      		right:20px;
      	}
      	.ratio{
      		position: absolute;
      		bottom:2upx;
      		right:50px;
      		color:#999999;
      		font-size: 24upx;
      		font-family: 苹方,regular;
      	}
      	.order{
      		position: relative;
      		height:80upx;
      		width:358upx;
      		margin-left:98upx;
      		top: 20upx;
             border: 2upx solid #E6E6E6;
      		border-radius: 10upx;
      	}
      	.jianfei{
      		position: absolute;
      		top:25upx;
      		left: 36upx;
      		font-size: 28upx;
      		color: #333333;
             font-family: 苹方,regular;
      	}
      	.baidu{
      		position: absolute;
      		right: 36upx;
      		bottom:16upx;
      		width: 48upx;
      		height: 48upx;
      		background-repeat: no-repeat;
      	}
      	.qr_code{
      		position: absolute;
      		bottom: 28upx;
      		right: 98upx;
      		width: 80upx;
      		height: 80upx;
      		background-repeat: no-repeat;
      	} */
</style>
